<template>
    <span :class="{ error: !answer, right: answer, undo: answer === null }">
        <slot>1.未完成</slot>
    </span>
</template>

<script>
export default {
    props: ['answer']
};
</script>

<style scoped>
.right {
    color: green;
}

.error {
    color: red;
}

.undo {
    color: #ccc;
}
</style>